home *** CD-ROM | disk | FTP | other *** search
/ Hot Metal Pro 4.0 / Hot Metal Pro 4.0.iso / Special / text / template.txt < prev    next >
Encoding:
Text File  |  1997-11-17  |  7.3 KB  |  215 lines

  1.  
  2. 6. Creating projects from templates
  3.  
  4.  
  5.  
  6. From the Information Manager, you have the option of
  7. creating a new project from existing files, from the
  8. Site Maker wizard, or from predefined templates, using
  9. the Template wizard. This chapter discusses using and
  10. configuring the Template wizard.
  11.  
  12. 6.1. Creating a project
  13.  
  14.  To create a new project from one of several templates:
  15.  
  16. * Choose New Project from the Information Manager File
  17. menu, and then choose From Template... from the sub-menu.
  18.  
  19. The HoTMetaL PRO Template wizard is launched. This wizard
  20. guides you through the process of creating a new project.
  21. Descriptions of what you are creating appear below the
  22. choices you make in each screen. 
  23.  
  24. First, you are asked whether you want to create a new,
  25. blank project or create a project from the templates.
  26. If you choose New Project by clicking on the radio button,
  27. and then click on [Next >>], a new project with a blank
  28. document called index.htm is created, and the template
  29. wizard jumps directly to the screen that asks where
  30. you want to save the file.
  31.  
  32. If you choose Templates by clicking on the radio button
  33. and click on [Next >>], the Templates screen appears,
  34. and you are prompted to choose from the following Categories:
  35.  
  36. * Company Web Site -- Style 1
  37.  
  38. * Company Web Site -- Style 2
  39.  
  40. * Personal Web Site -- Style 1
  41.  
  42. * Personal Web Site -- Style 2 (Animated)
  43.  
  44. * Company Intranet
  45.  
  46. A description of the new project templates appears in
  47. the Description section, and a graphic of the template's
  48. file structure appears on the right hand side of the
  49. dialog box. Select whichever option you want by clicking
  50. on the radio button, then click on [Next>>]. 
  51.  
  52. These categories can be customized by editing the Template
  53. wizard configuration file (see  Configuring the New
  54. Project wizard). 
  55.  
  56. Once you have chosen which template you want to base
  57. your project on and clicked on [Next>>], a dialog box
  58. appears, asking you where you would like your project
  59. to be created. Select the appropriate folder, click
  60. on [Finished], and your project templates will be copied
  61. to that location.
  62.  
  63. The site will be opened as a new project in the Information
  64. Manager. You can now begin to edit the documents that
  65. were created from the template using the HoTMetaL PRO
  66. Editor in order to insert your own content.
  67.  
  68. 6.2. Configuring the Site Template wizard
  69.  
  70. After using the HoTMetaL PRO Information Manager for
  71. some time, you may want to configure the template wizard
  72. so that it generates the kind of sites that you use
  73. often. This section gives you instruction on how to
  74. do that.
  75.  
  76. This wizard is configured by the file sitetmpl.hpt,
  77. which is located in the HoTMetaL PRO folder. You can
  78. modify this file if you want to use your own configuration
  79. for the new project wizard.
  80.  
  81. The sitetmpl.hpt file is an SGML file conforming to
  82. the following DTD:
  83.  
  84. <!ELEMENTáBODYá-á-á(CAT_INFO)+>
  85. <!ELEMENTáCAT_INFOáá-á-á(CAT_INFO)*>
  86. <!ATTLISTáCAT_INFO
  87. SHORTááááCDATAáá#REQUIREDáá
  88. LONGáááááCDATAáá#REQUIREDáá
  89. DIRááááááCDATAáá#IMPLIEDáá
  90. HOMEPAGEáCDATAá#REQUIREDáá
  91. IMGááááááCDATAáá#REQUIREDá>
  92.  
  93. There is a sample at the end of this section. You can
  94. create this file with an SGML editor such as SoftQuad
  95. Author/Editor, or with a text editor. If you use a text
  96. editor, be careful to use the correct markup syntax.
  97.  
  98. 6.3. Using the configuration file
  99.  
  100. The functionality described in this topic is available
  101. in HoTMetaL PRO 4.0, but not in the Evaluation Version
  102. that you are now using. Choose `How To Purchase' in
  103. the Help menu for ordering information.
  104.  
  105. An element called BODY (that is, the tags <BODY> and
  106. </BODY>) surrounds the contents of the file.
  107.  
  108. Each template category in the Categories section of
  109. the template wizard's initial dialog box corresponds
  110. to a CAT_INFO element that is directly nested inside
  111. BODY.
  112.  
  113. You can specify information about a template category
  114. using the attributes of the corresponding CAT_INFO element.
  115.  
  116.  If you are editing the sitetmpl.hpt with a text editor:
  117. the attributes are contained in the <CAT_INFO> start-tag,
  118. between the element name and the closing `>', as in
  119. the example below). Each attribute specification consists
  120. of an attribute name, assigned to a value enclosed in
  121. double quotes, using an equals sign. For example:
  122.  
  123. SHORT="SampleáProjectsáandáTemplates"
  124.  
  125. The attributes of CAT_INFO are used as follows: 
  126.  
  127. * SHORT - The label that appears in the Categories list
  128. in the template wizard dialog.
  129.  
  130. * LONG - The long description of the template category
  131. in the template wizard dialog. The description can contain
  132. line breaks and blank lines. 
  133.  
  134. * DIR - The folder where the files that constitute this
  135. template are kept. When the template is opened, all
  136. of the files in this folder (and its subfolders) will
  137. be copied to the destination folder.
  138.  
  139. * HOMEPAGE - The `index page' or starting point for
  140. the template files. This page is used as the index page
  141. when the Information Manager builds a project based
  142. on the chosen template.
  143.  
  144. * IMG - An image representing the template, displayed
  145. on the right side of the template wizard dialog box.
  146.  
  147. The DIR, HOMEPAGE, and IMG can be specified with absolute
  148. or relative paths, but not with URLs. A relative path
  149. for DIR or IMG is relative to the HoTMetaL PRO folder;
  150. a relative path for HOMEPAGE is relative to the DIR
  151. location. 
  152.  
  153. Each template category can have an arbitrary number
  154. of levels of sub-categories. Sub-categories are displayed
  155. in the template wizard by choosing a category and then
  156. clicking on the [Next>>] button in the initial dialog
  157. box. If a template category has no sub-categories (that
  158. is, the corresponding CAT_INFO has no nested CAT_INFOs),
  159. clicking on [Next>>] displays a dialog for choosing
  160. the destination folder, into which the chosen template
  161. and its auxiliary files will be copied. 
  162.  
  163. To give a category one or more sub-categories: 
  164.  
  165. * Nest one or more CAT_INFO elements inside the CAT_INFO
  166. element corresponding to the current category. 
  167.  
  168. * Delete the DIR attribute value in the current category's
  169. CAT_INFO element.
  170.  
  171. * Configure the sub-category by setting its attribute
  172. values as described above.
  173.  
  174. 6.4. Sample configuration file
  175.  
  176. The functionality described in this topic is available
  177. in HoTMetaL PRO 4.0, but not in the Evaluation Version
  178. that you are now using. Choose `How To Purchase' in
  179. the Help menu for ordering information.
  180.  
  181. Here is a sample sitetmpl.hpt file that defines one
  182. category with three sub-categories.
  183. <BODY>
  184. <CAT_INFOáSHORT="SampleáProjectsáandáTemplates"
  185. LONG="CollectionsáofáHTMLádocumentsádesignedátoábeáusedáas
  186. templatesáinácreatingáaácorporateáintranet."
  187. IMG="template\core\filelist.bmp">
  188.  
  189. <CAT_INFOáSHORT="CorporateáPages"
  190. LONG="Corporateáhomepageáandáotherácompany-wideádocuments."
  191. DIR="template\core\"
  192. HOMEPAGE="index.htm"
  193. IMG="template\core\corp.bmp">
  194. </CAT_INFO>
  195.  
  196. <CAT_INFOáSHORT="SampleáHRáDepartment"
  197. LONG="HRáHomepageáandáassociatedáprojects.áIncludes
  198. workgroupápagesáplusáHRádepartmentádocuments."
  199. DIR="template\humanres\"
  200. HOMEPAGE="index.htm"
  201. IMG="template\core\hr.bmp"áhomePage="index.htm">
  202. </CAT_INFO>
  203.  
  204. <CAT_INFOáSHORT="SampleáFinanceáDepartment"
  205. LONG="FinanceáHomepageáandáassociatedáprojects.ááIncludes
  206. workgroupápagesáplusáFinanceádepartmentádocuments."
  207. DIR="template\account\"
  208. HOMEPAGE="index.htm"
  209. IMG="template\core\account.bmp">
  210. </CAT_INFO>
  211.  
  212. </CAT_INFO>
  213. </BODY>
  214.  
  215.